home *** CD-ROM | disk | FTP | other *** search
/ The Big Mouth 8 / Big_Mouth_The_08_1996_-_Side_B.d64 / mille bourns (.txt) next >
Commodore BASIC  |  2023-02-26  |  6KB  |  197 lines

  1. 100 rem f. covitz
  2. 110 poke53280,5:poke53281,11:poke53272,21:print"[147][155]":deffna(l)=2^(l-1):e=106
  3. 115 i=rnd(-ti)
  4. 120 dims(7),c%(e),t$(4,5),pl(1,3),h(1,7),t1%(4),t2%(4,5),tb(1)
  5. 130 data"out of gas","flat tire",accident,"speed limit(50)",stop
  6. 140 datagas,"spare tire",repairs,"end speed limit",roll,"extra tank"
  7. 150 data"permanent tire","driving ace",r,right-of-way,200,100,75,50,25
  8. 160 fori=1to4:forj=1to5:readt$(i,j):nextj,i
  9. 170 data18,56,60,106,4,7,10,14,19,25,31,37,43,57,58,59,60,60,61,65,77,87,97,107
  10. 180 b$="                                      "
  11. 190 fori=1to4:readt1%(i):nexti:fori=1to4:forj=1to5:readt2%(i,j):nextj,i
  12. 200 g=0:fori=1toe:c%(i)=i:nexti:s(0)=0:s(1)=0
  13. 210 print"shuffling...":gosub720:gosub800
  14. 220 fori=0to1:forj=0to3:pl(i,j)=0:nextj:tb(i)=9:nexti
  15. 230 fori=0to1:forj=1to6:cn=cn+1:h(i,j)=c%(cn):nextj,i
  16. 240 print"":fora=1to6:c=h(1,a):gosub760:printtab(3);n$:nexta
  17. 250 p=1:cn=cn+1:ifcn>ethens=s+1:ifs>6thenn$="nobody":goto1680
  18. 260 ifs>0then300
  19. 270 c=c%(cn):h(1,0)=c:gosub760:print"";
  20. 280 printtab(3)left$(b$,13)
  21. 290 print"[145]";tab(3);n$
  22. 300 print"your move[146]"left$(b$,30)
  23. 310 if(pl(0,3)and8)andpl(0,2)>-1thenpl(0,2)=5:j=22:gosub2020:printtab(9);"roll      "
  24. 320 print" play(p) or discard(d) which card?   [157][157]";
  25. 330 getn$:ifn$>""goto330
  26. 340 getn$:ifn$<>"d"andn$<>"p"andn$<>" "thengosub2040:goto340
  27. 350 printn$;:ifn$=" "thenn$="d":n=s:print"[157]d"mid$(str$(s+1),2):goto410
  28. 360 getq$:ifq$=chr$(20)goto320
  29. 370 n=val(q$)-1:ifn>6orn<sthengosub2040:goto360
  30. 380 printq$;
  31. 390 getq$:ifq$=""thengosub2040:goto390
  32. 400 ifq$<>chr$(13)thenprint"[157] [157]";:goto360
  33. 410 print:ifn$="d"thengosub900:gosub880:goto440
  34. 420 gosub860
  35. 430 ifch=0theninput",ok  y[157][157][157]";n$:goto300
  36. 440 print"":fora=0to3+s:print"";:nexta:printtab(3)left$(b$,18)
  37. 450 ifpl(1,0)=1000thenn$="you":goto1680
  38. 460 d$="play"
  39. 470 print"":fori=1to39:print" ";:nexti
  40. 480 print"thinking....":p=0:cn=cn+1
  41. 490 if(pl(1,3)and8)andpl(1,2)>-1thenpl(1,2)=5:j=16:gosub2020:printtab(9);"roll      "
  42. 500 ifs=0thenh(0,0)=c%(cn)
  43. 510 hz=pl(0,2):ifhz>-1andpl(0,1)>-1then580
  44. 520 gosub1430:ifcfthenpl(0,3)=pl(0,3)+fna(m):pl(0,cf)=m:s(2)=s(2)+300
  45. 530 ifcfthens(4)=s(4)+100:goto700
  46. 540 ifsorpl(1,0)>790orpl(0,0)>790thengosub1630:ifsfthen700
  47. 550 gosub1390:ifchthenpl(0,ch)=m:goto700
  48. 560 ifpl(0,2)>-1then580
  49. 570 goto660
  50. 580 ifpl(0,2)<5then650
  51. 590 lm=201:ifpl(0,1)<0thenlm=51
  52. 600 iflm<200andpl(0,0)<900thengosub1370:ifchthenpl(0,1)=4:goto700
  53. 610 ch=0:d=0:fora=sto6:c=h(0,a):gosub760:b=val(n$)
  54. 620 ifb<lmand(b+pl(0,0)<1001)andb>dthend=b:n=a:ch=1
  55. 630 nexta:ifchthenpl(0,0)=pl(0,0)+d:goto700
  56. 640 goto660
  57. 650 gosub1480:ifchand(pl(0,2)>-1)thenpl(0,2)=5:goto700
  58. 660 ifpl(1,2)<0andpl(1,1)<0then690
  59. 670 gosub1300:ifch=1andpl(1,0)<950thenpl(1,1)=-4:goto700
  60. 680 ifch=2andpl(1,2)=5thenpl(1,2)=-m:goto700
  61. 690 gosub1500
  62. 700 gosub1740:ifpl(0,0)=1000thenn$="i":goto1680
  63. 710 gosub2030:goto250
  64. 720 cn=0:en=e+1:s=0
  65. 730 fori=2to5:s(i)=0:nexti
  66. 740 fori=1toe:r%=i+(en-i)*rnd(ti):t=c%(i):c%(i)=c%(r%):c%(r%)=t:rem
  67. 750 nexti:return
  68. 760 fori=1to4:forj=1to5
  69. 770 ifc>t1%(i)thenj=5:goto790
  70. 780 ifc<t2%(i,j)thenn$=t$(i,j):k=i:l=j:i=4:j=5
  71. 790 nextj,i:return
  72. 800 print"[147] your hand [146]";spc(13);"discard[146]"
  73. 810 fori=0to6:printi+1:nexti:print:print"your pile"
  74. 820 print"distance[141]speed   [141]battle  [141]safety  "
  75. 830 print:print"my pile"
  76. 840 print"distance[141]speed   [141]battle  [141]safety  "
  77. 850 print"";:return
  78. 860 c=h(1,n):gosub760:gosub930:p=1
  79. 870 ifch=0thenprint""ms$;:return
  80. 880 gosub920:j=n+5+6*(1-p):gosub2020:printtab(3)left$(b$,20)
  81. 890 print"[145]"tab(3):c=h(p,n):gosub760:printn$:return
  82. 900 c=h(p,n):gosub760
  83. 910 print""tab(23)n$left$(b$,16-len(n$)):print"":return
  84. 920 h(p,n)=h(p,s):return
  85. 930 p=1:ms$="":onkgoto1010,1090,1210,940
  86. 940 d=val(n$):ifpl(1,0)+d>1000thenms$="you have exceeded 1000"
  87. 950 ifpl(1,1)=-4andd>50thenms$="you have a "+t$(1,4)
  88. 960 ifpl(1,2)<5thenms$="you don't have a roll card"
  89. 970 ifpl(1,2)<0thenms$="you have a hazard"
  90. 980 ifms$<>""thench=0:return
  91. 990 pl(1,0)=pl(1,0)+d:ch=1
  92. 1000 n$=str$(pl(1,0)):j=14:goto1190
  93. 1010 ifl<>4andpl(0,2)<5thenms$="i don't have a roll card"
  94. 1020 ifl<>4andpl(0,2)<0thenms$="i already have a hazard"
  95. 1030 ifl=4andpl(0,1)<0thenms$="i have a speed limit"
  96. 1040 ifl=4and(pl(0,3)and16)thenms$="i have "+t$(3,5)
  97. 1050 ifpl(0,3)andfna(l)thenms$="ha!-i have the safety"
  98. 1060 ifms$<>""thench=0:return
  99. 1070 ifl<>4thenpl(0,2)=-l:j=22:goto1190
  100. 1080 ch=1:pl(0,1)=-4:j=21:goto1190
  101. 1090 ifl<>5then1140
  102. 1100 ifpl(1,2)=5thenms$="you have a roll card"
  103. 1110 ifpl(1,2)<0thenms$="you have a hazard":ifpl(1,2)=-5thenms$=""
  104. 1120 ifms$<>""thench=0:return
  105. 1130 pl(1,2)=5:goto1180
  106. 1140 ifl=4andpl(1,1)=-4thenpl(p,1)=4:j=15:goto1190
  107. 1150 ifpl(1,2)<>-lthenms$="you don't need to do that"
  108. 1160 ifms$<>""thench=0:return
  109. 1170 pl(p,2)=l
  110. 1180 j=16
  111. 1190 gosub2020:printtab(9)n$"       "
  112. 1200 ch=1:return
  113. 1210 p=1:cf=0:ifpl(1,2)=-lthenpl(1,2)=l:cf=1
  114. 1220 ifl=5andpl(1,1)<0thencf=1
  115. 1230 s(5)=s(5)+100:pl(1,3)=pl(1,3)+fna(l)
  116. 1240 ifcfthenprint"coup fouree":s(3)=s(3)+300:gosub2030
  117. 1250 ifl=5thenpl(p,3)=pl(p,3)+8:pl(p,1)=4:j=21-6*p:gosub2020:printtab(9)t$(2,4)
  118. 1260 j=23-6*p:gosub2020:printtab(tb(p))""n$""
  119. 1270 tb(p)=tb(p)+15:iftb(p)>30andtb(p)<49thentb(p)=49
  120. 1280 ifcfandpl(p,2)=lthenj=22-6*p:gosub2020:printtab(9)t$(2,l)"       "
  121. 1290 cf=0:ch=1:return
  122. 1300 ch=0:fora=sto6:c=h(0,a):gosub760
  123. 1310 ifk<>1then1360
  124. 1320 ifl=4andpl(1,1)>-1thench=1:m=l:n=a
  125. 1330 ifl<>4andpl(1,2)>0thench=2:m=l:n=a
  126. 1340 iffna(l)andpl(1,3)thench=0
  127. 1350 ifchthena=6
  128. 1360 nexta:return
  129. 1370 ch=0:fora=sto6:c=h(0,a):gosub760:ifk=2andl=4thench=1:n=a:a=6
  130. 1380 nexta:return
  131. 1390 ch=0:fora=sto6:c=h(0,a):gosub760
  132. 1400 ifk=2andl=-hzthench=2:m=l:n=a:a=6:goto1420
  133. 1410 ifk=2andl=4andpl(0,1)=-4thench=1:m=l:n=a
  134. 1420 nexta:return
  135. 1430 sf=0:cf=0:fora=sto6:c=h(0,a):gosub760:ifk<>3then1470
  136. 1440 ifpl(0,1)<0andl=5thencf=1
  137. 1450 sf=sf-8*(l=5)+fna(l):m=l:n=a:ifl=-hzthencf=2
  138. 1460 ifcfthena=6
  139. 1470 nexta:return
  140. 1480 ch=0:fora=sto6:c=h(0,a):gosub760:ifk=2andl=5thench=1:n=a:a=6
  141. 1490 nexta:return
  142. 1500 d$="discard":fora=sto6:c=h(0,a):gosub760
  143. 1510 ifk=1and(pl(1,3)andfna(l))then1670
  144. 1520 ifk=1andl=4andpl(1,0)>949then1670
  145. 1530 ifk=2and(fna(l)and(pl(0,3)orsf))then1670
  146. 1540 ifk=4andval(n$)>(1000-pl(0,0))then1670
  147. 1550 nexta
  148. 1560 fora=sto6:c=h(0,a):gosub760
  149. 1570 ifk=4andval(n$)andval(n$)<76then1670
  150. 1580 nexta
  151. 1590 fora=sto6:c=h(0,a):gosub760
  152. 1600 ifk=1and(fna(l)and(pl(0,3)orsf)=0)then1670
  153. 1610 ifk=2andl<5and(pl(1,3)andfna(l)=0)then1670
  154. 1620 nexta
  155. 1630 gosub1430
  156. 1640 ifsfthenpl(0,3)=pl(0,3)+fna(m):d$="play[146]":s(4)=s(4)+100:return
  157. 1650 n=int((7-s)*rnd(1))+s:ifsthenreturn:c=h(0,n):gosub760:ifval(n$)>100goto1650
  158. 1660 return
  159. 1670 n=a:a=6:nexta:return
  160. 1680 print" "n$" reached 1000 miles!!...":printb$
  161. 1690 input"[145]next round  y[157][157][157]";n$
  162. 1700 gosub1860:ifg>4orleft$(n$,1)="n"thenprint"game over":goto1720
  163. 1710 input"ok  y[157][157][157]";n$:goto210
  164. 1720 input"new game  y[157][157][157]";n$:ifn$="y"thenrun
  165. 1730 end
  166. 1740 p=0:c=h(0,n):gosub760
  167. 1750 print"my "d$"[146] is "n$;:fori=1to32-len(d$+n$):print" ";:nexti
  168. 1760 print:p=0
  169. 1770 iflen(d$)>6thengosub910:gosub920:return
  170. 1780 ifcfthenprint"coup fouree"
  171. 1790 print"":ifk=4thenn$=str$(pl(0,0)):j=20
  172. 1800 ch=0:ifk=3thenj=23:ch=1
  173. 1810 ifk=2thenj=22:ifl=4thenj=21
  174. 1820 ifk=1thenj=16:ifl=4thenj=15
  175. 1830 gosub2020:printtab(9);
  176. 1840 ifchthengosub1250:gosub920:return
  177. 1850 printn$"         ":gosub920:return
  178. 1860 g=g+1:print"[147]scores for round"g
  179. 1870 print:printtab(17)"me"tab(26)"you"
  180. 1880 print"distance"tab(15)pl(0,0)tab(25)pl(1,0)
  181. 1890 s(6)=pl(0,0):s(7)=pl(1,0)
  182. 1900 print"complete trip"
  183. 1910 ifs(6)=1000thenprinttab(15)"[145] 400":s(6)=s(6)+400
  184. 1920 ifs(7)=1000thenprinttab(25)"[145] 400":s(7)=s(7)+400
  185. 1930 print"coups fourees"tab(15)s(2)tab(25)s(3)
  186. 1940 s(6)=s(6)+s(2):s(7)=s(7)+s(3)
  187. 1950 print"safeties"tab(15)s(4)tab(25)s(5)
  188. 1960 s(6)=s(6)+s(4):s(7)=s(7)+s(5)
  189. 1970 print"shut out":ifpl(1,0)=0thenprinttab(15)"[145] 500":s(6)=s(6)+500
  190. 1980 ifpl(0,0)=0thenprinttab(25)"[145] 500":s(7)=s(7)+500
  191. 1990 print:print"round"g"total"tab(15)s(6)tab(25)s(7)
  192. 2000 s(0)=s(0)+s(6):s(1)=s(1)+s(7)
  193. 2010 print:print"grand total"tab(15)s(0)tab(25)s(1):return
  194. 2020 print"";:fori=1toj:print:nexti:return
  195. 2030 fori=0to800:nexti:return
  196. 2040 print"[166][157]";:i=fre(0):print" [157]";:return
  197.